<template>
  <!-- 待配包 -->
    <div class="verification-project-container">
      <div v-if="isremark!==null" style="margin-bottom: 10px;color: red;">
        {{isremark}}
      </div>
      <projectmedia  :brandPlacementTypeList="brandPlacementTypeList"
      :medialist="medialist"   @update-list="handleUpdateList" :parentInfoobj="parentInfoobj"></projectmedia>
      <div>
        <!-- 第二次竞价列表 -->
        <div
          class="good_sku_list"
          v-if="
            orderShowMsg.channelUserSecondBiddingListDTOS &&
            orderShowMsg.channelUserSecondBiddingListDTOS.length > 0 &&
            userInfo.role &&
            !userInfo.role.includes(40) &&
            !userInfo.role.includes(55)
          "
        >
          <el-table
            :data="orderShowMsg.channelUserSecondBiddingListDTOS"
            max-height="300"
            :row-style="{ height: '0' }"
            :cell-style="{ padding: '3px' }"
            border
            style="width: 100%; height: auto"
          >
            <el-table-column prop="pioneerName" label="开拓者姓名">
            </el-table-column>
            <el-table-column prop="channelName" label="渠道姓名">
            </el-table-column>
            <el-table-column prop="totalPrice" label="总价"> </el-table-column>
            <el-table-column prop="rankNum" label="排名"> </el-table-column>
            <el-table-column prop="status" label="状态">
              <template slot-scope="scope">
                <div>
                  {{
                    scope.row.status == 1
                      ? "进行中"
                      : scope.row.status == 2
                        ? "竞价成功"
                        : scope.row.status == 3
                          ? "失去挑战资格"
                          : "--"
                  }}
                </div>
              </template>
            </el-table-column>
            <el-table-column prop="isAbandon" label="是否放弃">
              <template slot-scope="scope">
                <div>{{ scope.row.isAbandon == 2 ? "已放弃" : "--" }}</div>
              </template>
            </el-table-column>
            <el-table-column prop="createTime" label="时间">
              <template slot-scope="scope">
                <div>
                  {{
                    scope.row.createTime
                      ? formatterTime(scope.row.createTime)
                      : ""
                  }}
                </div>
              </template>
            </el-table-column>
            <el-table-column label="操作">
              <template slot-scope="scope">
                <el-popover placement="right" width="700" trigger="click">
                  <el-table
                    :data="scope.row.goodPriceLists"
                    :row-style="{ height: '0' }"
                    :cell-style="{ padding: '3px' }"
                    border
                    max-height="500"
                  >
                    <el-table-column
                      width="200"
                      property="goodName"
                      label="商品名称"
                    ></el-table-column>
                    <el-table-column
                      width="200"
                      property="skuName"
                      label="sku"
                    ></el-table-column>
                    <el-table-column
                      width="100"
                      property="num"
                      label="数量"
                    ></el-table-column>
                    <el-table-column
                      width="150"
                      property="price"
                      label="单价"
                    ></el-table-column>
                  </el-table>
                  <el-button slot="reference" type="text" size="small"
                    >查看详情</el-button
                  >
                </el-popover>
              </template>
            </el-table-column>
          </el-table>
        </div>
        <el-divider
          v-if="
            orderShowMsg.channelUserFirstBiddingListDTOS &&
            orderShowMsg.channelUserFirstBiddingListDTOS.length > 0 &&
            userInfo.role &&
            !userInfo.role.includes(40) &&
            !userInfo.role.includes(55)
          "
        ></el-divider>
        <!-- 第一次竞价列表 -->
        <el-descriptions
          title="第一次竞价列表"
          v-if="
            orderShowMsg.channelUserFirstBiddingListDTOS &&
            orderShowMsg.channelUserFirstBiddingListDTOS.length > 0 &&
            userInfo.role &&
            !userInfo.role.includes(40) &&
            !userInfo.role.includes(55)
          "
        ></el-descriptions>
        <div
          class="good_sku_list"
          v-if="
            orderShowMsg.channelUserFirstBiddingListDTOS &&
            orderShowMsg.channelUserFirstBiddingListDTOS.length > 0 &&
            userInfo.role &&
            !userInfo.role.includes(40) &&
            !userInfo.role.includes(55)
          "
        >
          <div style="font-size: initial; font-weight: bold; color: #dd8e6f">
            第一次竞价截止时间：{{
              orderShowMsg.biddingOneEndTime
                ? formatterTime(orderShowMsg.biddingOneEndTime)
                : "无"
            }}
          </div>
          <el-table
            :data="orderShowMsg.channelUserFirstBiddingListDTOS"
            max-height="300"
            :row-style="{ height: '0' }"
            :cell-style="{ padding: '3px' }"
            border
            style="width: 100%; height: auto"
          >
            <el-table-column prop="pioneerName" label="开拓者姓名">
            </el-table-column>
            <el-table-column prop="channelName" label="渠道姓名">
            </el-table-column>
            <el-table-column prop="totalPrice" label="总价"> </el-table-column>
            <el-table-column prop="rankNum" label="排名"> </el-table-column>
            <el-table-column prop="status" label="状态">
              <template slot-scope="scope">
                <div>
                  {{
                    scope.row.status == 1
                      ? "进行中"
                      : scope.row.status == 2
                        ? "竞价成功"
                        : scope.row.status == 3
                          ? "失去挑战资格"
                          : "--"
                  }}
                </div>
              </template>
            </el-table-column>
            <el-table-column prop="isAbandon" width="180" label="是否放弃">
              <template slot-scope="scope">
                <div>{{ scope.row.isAbandon == 2 ? "已放弃" : "--" }}</div>
              </template>
            </el-table-column>
            <el-table-column prop="createTime" width="180" label="时间">
              <template slot-scope="scope">
                <div>
                  {{
                    scope.row.createTime
                      ? formatterTime(scope.row.createTime)
                      : ""
                  }}
                </div>
              </template>
            </el-table-column>
            <el-table-column label="操作">
              <template slot-scope="scope">
                <el-popover placement="right" width="700" trigger="click">
                  <el-table
                    :data="scope.row.goodPriceLists"
                    :row-style="{ height: '0' }"
                    :cell-style="{ padding: '3px' }"
                    border
                    max-height="500"
                  >
                    <el-table-column
                      width="200"
                      property="goodName"
                      label="商品名称"
                    ></el-table-column>
                    <el-table-column
                      width="200"
                      property="skuName"
                      label="sku"
                    ></el-table-column>
                    <el-table-column
                      width="100"
                      property="num"
                      label="数量"
                    ></el-table-column>
                    <el-table-column
                      width="150"
                      property="price"
                      label="单价"
                    ></el-table-column>
                  </el-table>
                  <el-button slot="reference" type="text" size="small"
                    >查看详情</el-button
                  >
                </el-popover>
              </template>
            </el-table-column>
          </el-table>
        </div>
        <el-divider
          v-if="
            orderShowMsg.checkCostPrice &&
            orderShowMsg.checkCashPrice &&
            orderShowMsg.checkRemark &&
            userInfo.role &&
            !userInfo.role.includes(40) &&
            !userInfo.role.includes(55)
          "
        ></el-divider>

        <!-- 核价开拓者提交信息 -->
        <!-- <el-descriptions title="核价开拓者提交信息" v-if="orderShowMsg.checkCostPrice && orderShowMsg.checkCashPrice && orderShowMsg.checkRemark"></el-descriptions> -->
        <div style="padding: 10px; background-color: #ffffff;">
        <div
          v-if="
            orderShowMsg.checkCostPrice &&
            orderShowMsg.checkCashPrice &&
            orderShowMsg.checkRemark &&
            userInfo.role &&
            !userInfo.role.includes(40) &&
            !userInfo.role.includes(55)
          "
        >
          <el-descriptions direction="vertical" border
            title="核价开拓者提交信息"
            v-if="
              orderShowMsg.checkCostPrice &&
              orderShowMsg.checkCashPrice &&
              orderShowMsg.checkRemark &&
              userInfo.role &&
              !userInfo.role.includes(40) &&
              !userInfo.role.includes(55)
            "
          >
            <!-- <el-descriptions-item label="核价-建议成本">{{
              orderShowMsg.checkCostPrice
            }}</el-descriptions-item>
            <el-descriptions-item label="核价-变现价格">{{
              orderShowMsg.checkCashPrice
            }}</el-descriptions-item>
            <el-descriptions-item label="核价-备注">{{
              orderShowMsg.checkRemark
            }}</el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                核价-成本比例&nbsp;
                <el-tooltip class="tooltip" effect="dark" placement="right">
                  <ul slot="content">
                    <li>建议成本/客户货值</li>
                  </ul>
                  <i class="el-icon-question"></i>
                </el-tooltip>
              </template>
              {{ orderShowMsg.checkCostPriceRate }}%
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                核价-变现折扣&ensp;
                <el-tooltip class="tooltip" effect="dark" placement="right">
                  <ul slot="content">
                    <li>变现价格/客户货值</li>
                  </ul>
                  <i class="el-icon-question"></i>
                </el-tooltip>
              </template>
              {{ orderShowMsg.checkCashPriceRate }}%
            </el-descriptions-item> -->
          </el-descriptions>
         
            <el-table
              :data="orderShowMsg.checkMsgList"
              max-height="300"
              :row-style="{ height: '0' }"
              :cell-style="{ padding: '3px' }"
              border
              style="width: 100%; height: auto;"
              v-loading.fullscreen.lock="tableLoading"
            >
              <el-table-column prop="nickName" label="开拓者姓名">
              </el-table-column>
              <el-table-column prop="checkCostPrice" label="建议成本">
              </el-table-column>
              <el-table-column prop="checkCashPrice" label="变现价格">
              </el-table-column>
              <el-table-column prop="checkRemark" label="核价备注" width="280">
              </el-table-column>
              <el-table-column prop="createTime" label="提交时间" width="160">
                <template slot-scope="scope">
                  <div>
                    {{
                      scope.row.createTime
                        ? formatterTime(scope.row.createTime)
                        : ""
                    }}
                  </div>
                </template>
              </el-table-column>
            </el-table>
          </div>
        </div>
        <el-divider
          v-if="
            orderShowMsg.channelUserCheckListDTOS &&
            orderShowMsg.channelUserCheckListDTOS.length > 0 &&
            userInfo.role &&
            !userInfo.role.includes(40) &&
            !userInfo.role.includes(55)
          "
        ></el-divider>
        <!-- 核价列表 -->
        <el-descriptions
          title="渠道核价列表"
          v-if="
            orderShowMsg.channelUserCheckListDTOS &&
            orderShowMsg.channelUserCheckListDTOS.length > 0 &&
            userInfo.role &&
            !userInfo.role.includes(40) &&
            !userInfo.role.includes(55)
          "
        ></el-descriptions>
        <div
          class="good_sku_list"
          v-if="
            orderShowMsg.channelUserCheckListDTOS &&
            orderShowMsg.channelUserCheckListDTOS.length > 0 &&
            userInfo.role &&
            !userInfo.role.includes(40) &&
            !userInfo.role.includes(55)
          "
        >
          <el-table
            :data="orderShowMsg.channelUserCheckListDTOS"
            max-height="300"
            :row-style="{ height: '0' }"
            :cell-style="{ padding: '3px' }"
            border
            style="width: 100%; height: auto"
          >
            <el-table-column prop="pioneerName" label="开拓者姓名">
            </el-table-column>
            <el-table-column prop="channelName" label="渠道姓名">
            </el-table-column>
            <el-table-column prop="totalPrice" label="总价"> </el-table-column>
            <el-table-column prop="createTime" label="时间">
              <template slot-scope="scope">
                <div>
                  {{
                    scope.row.createTime
                      ? formatterTime(scope.row.createTime)
                      : ""
                  }}
                </div>
              </template>
            </el-table-column>
            <el-table-column label="操作">
              <template slot-scope="scope">
                <el-popover placement="right" width="700" trigger="click">
                  <el-table
                    :data="scope.row.goodPriceLists"
                    :row-style="{ height: '0' }"
                    :cell-style="{ padding: '3px' }"
                    border
                    max-height="500"
                  >
                    <el-table-column
                      width="200"
                      property="goodName"
                      label="商品名称"
                    ></el-table-column>
                    <el-table-column
                      width="200"
                      property="skuName"
                      label="sku"
                    ></el-table-column>
                    <el-table-column
                      width="100"
                      property="num"
                      label="数量"
                    ></el-table-column>
                    <el-table-column
                      width="150"
                      property="price"
                      label="单价"
                    ></el-table-column>
                  </el-table>
                  <el-button slot="reference" type="text" size="small"
                    >查看详情</el-button
                  >
                </el-popover>
              </template>
            </el-table-column>
          </el-table>
        </div>
        <!-- 助理核价列表 -->
        <el-descriptions
          title="助理核价列表"
          v-if="
            orderShowMsg.assistantCheckList &&
            orderShowMsg.assistantCheckList.length > 0 &&
            userInfo.role &&
            !userInfo.role.includes(40) &&
            !userInfo.role.includes(55)
          "
        ></el-descriptions>
        <div
          class="good_sku_list"
          v-if="
            orderShowMsg.assistantCheckList &&
            orderShowMsg.assistantCheckList.length > 0 &&
            userInfo.role &&
            !userInfo.role.includes(40) &&
            !userInfo.role.includes(55)
          "
        >
          <el-table
            :data="orderShowMsg.assistantCheckList"
            max-height="300"
            :row-style="{ height: '0' }"
            :cell-style="{ padding: '3px' }"
            border
            style="width: 100%; height: auto"
          >
            <el-table-column prop="nickName" label="助理姓名" width="180">
            </el-table-column>
            <el-table-column prop="channelName" label="渠道姓名" width="180">
            </el-table-column>
            <el-table-column prop="checkCashPrice" width="180" label="总价">
            </el-table-column>
            <el-table-column prop="createTime" width="180" label="时间">
              <template slot-scope="scope">
                <div>
                  {{
                    scope.row.createTime
                      ? formatterTime(scope.row.createTime)
                      : ""
                  }}
                </div>
              </template>
            </el-table-column>
          </el-table>
        </div>
        <el-divider></el-divider>
        <!-- 商品列表 -->
        <el-descriptions title="商品列表"></el-descriptions>
     
        <div
          class="good_sku_list"
          v-if="
            (orderShowMsg.goodList &&
              orderShowMsg.goodList.length > 0 &&
              orderShowMsg.fileType == 1) ||
            orderShowMsg.fileType == 4
          "
        >
          <el-table
            :data="orderShowMsg.goodList"
            height="350"
            :row-style="{ height: '0' }"
            :cell-style="{ padding: '3px' }"
            style="width: 100%"
          >
            <el-table-column prop="brandsValue" label="品牌" width="180">
            </el-table-column>
            <el-table-column prop="goodName" label="商品名称" width="180">
            </el-table-column>
            <el-table-column
              prop="goodExpirationDate"
              width="180"
              label="有效期至"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="goodWarrantyDate"
              width="180"
              label="保质期"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="goodSku"
              label="规格"
              width="180"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="goodSkuNum"
              width="150"
              label="数量"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="goodSkuPrice"
              width="180"
              label="旗舰店售卖价"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="goodCategory"
              width="180"
              label="商品所属类别（例:妆字号、械字号、消字号、药字号等）"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="goodOnlineLink"
              width="180"
              show-overflow-tooltip
              label="天猫/京东链接"
            >
              <template slot-scope="scope">
                <el-link
                  :href="scope.row.goodOnlineLink"
                  type="primary"
                  target="_blank"
                  v-if="scope.row.goodOnlineLink"
                  >跳转</el-link
                >
              </template>
            </el-table-column>
            <el-table-column
              prop="goodSkuPic"
              width="150"
              label="图片"
              show-overflow-tooltip
            >
              <template slot-scope="scope">
                <el-image
                  v-if="scope.row.goodSkuPic"
                  style="width: 100px; height: 100px"
                  :src="scope.row.goodSkuPic"
                  :preview-src-list="[scope.row.goodSkuPic]"
                >
                </el-image>
              </template>
            </el-table-column>
            <el-table-column
              prop="goodBoxNum"
              width="180"
              label="箱规（数量）"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="goodBoxSize"
              width="180"
              label="箱规（尺寸mm）"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="goodOneSize"
              width="180"
              label="单个产品包装尺寸mm"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="shopFans"
              width="180"
              label="店铺粉丝量"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="goodSaleNum"
              width="180"
              label="产品销量"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column prop="finalPrice" width="180" label="实际成交价">
            </el-table-column>
            <el-table-column
              prop="finalTotalPrice"
              width="180"
              label="实际成交总价"
            >
            </el-table-column>
            <el-table-column
              prop="flagshipStorePrice"
              width="180"
              label="旗舰店价格"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="flagshipStoreFans"
              width="180"
              label="旗舰店粉丝量"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="salesNum"
              width="180"
              label="销量"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="evaluateContent"
              width="180"
              label="评价"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="lowestPrice"
              width="180"
              label="最低价"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="link"
              width="180"
              label="链接"
              show-overflow-tooltip
            >
            </el-table-column>
          </el-table>
        </div>
        <div
          class="good_sku_list"
          v-if="
            orderShowMsg.goodList &&
            orderShowMsg.goodList.length > 0 &&
            orderShowMsg.fileType == 2
          "
        >
          <el-table
            :data="orderShowMsg.goodList"
            max-height="750"
            :row-style="{ height: '0' }"
            :cell-style="{ padding: '3px' }"
            style="width: 100%"
          >
            <el-table-column prop="chainStoreName" fixed label="连锁店铺名称">
            </el-table-column>
            <el-table-column prop="category" fixed label="类别">
            </el-table-column>
            <el-table-column
              prop="storeNumber"
              label="店铺数量"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column prop="links" label="美团/大众点评/小程序店铺链接">
              <template slot-scope="scope">
                <el-link
                  :href="scope.row.links"
                  type="primary"
                  target="_blank"
                  v-if="scope.row.links"
                  >跳转</el-link
                >
              </template>
            </el-table-column>
            <el-table-column
              prop="averageScore"
              label="美团/大众点评店铺平均评分"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="validityPeriod"
              label="有效期"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="useTime"
              label="使用时间"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="distributedCities"
              label="可使用分布城市"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="productName"
              label="产品名称"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="packageDetails"
              label="套餐详细内容"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column prop="price" label="单价"></el-table-column>
            <el-table-column prop="num" label="数量"></el-table-column>
            <el-table-column
              prop="totalGoodPrice"
              label="合计货值"
              show-overflow-tooltip
            ></el-table-column>
            <el-table-column
              prop="useRights"
              label="使用权益"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="couponForm"
              label="卡券形式（电子/实体）"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="usageRestrictions"
              label="使用限制"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="sellRequirements"
              label="客户对我司售卖要求"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="storeLinks"
              label="产品/套餐链接（美团、大众点评等）"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="storePics"
              label="产品/套餐图片"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="storeSaleNumbers"
              label="产品/套餐销量（美团、大众点评）"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="verificationProcess"
              label="核销流程"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column prop="finalPrice" label="实际成交价">
            </el-table-column>
            <el-table-column
              prop="finalTotalPrice"
              width="180"
              label="实际成交总价"
            >
            </el-table-column>
            <el-table-column
              prop="flagshipStorePrice"
              width="180"
              label="旗舰店价格"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="flagshipStoreFans"
              width="180"
              label="旗舰店粉丝量"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="salesNum"
              width="180"
              label="销量"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="evaluateContent"
              width="180"
              label="评价"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="lowestPrice"
              width="180"
              label="最低价"
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column
              prop="link"
              width="180"
              label="链接"
              show-overflow-tooltip
            >
            </el-table-column>
          </el-table>
        </div>
        <div
          class="good_sku_list"
          v-if="
            orderShowMsg.goodList &&
            orderShowMsg.goodList.length > 0 &&
            orderShowMsg.fileType == 3
          "
        >
          <div class="form_table_goods">
            <el-table
              :data="orderShowMsg.goodList"
              max-height="750"
              :row-style="{ height: '0' }"
              :cell-style="{ padding: '3px' }"
              style="width: 100%"
            >
              <el-table-column prop="hotelName" fixed label="酒店名称">
              </el-table-column>
              <el-table-column prop="hotelAddress" fixed label="酒店地址">
              </el-table-column>
              <el-table-column prop="busyTime" label="旺季时间">
              </el-table-column>
              <el-table-column prop="hotelType" label="房型"> </el-table-column>
              <el-table-column prop="expirationDate" label="有效期">
              </el-table-column>
              <el-table-column
                prop="isHaveMorning"
                label="是否含早"
              ></el-table-column>
              <el-table-column prop="num" label="数量"></el-table-column>
              <el-table-column prop="price" label="平台价"> </el-table-column>
              <el-table-column prop="url" show-overflow-tooltip label="链接">
              </el-table-column>
              <el-table-column prop="hotelPic" label="房间图片">
                <template slot-scope="scope">
                  <el-image
                    v-if="scope.row.hotelPic"
                    style="width: 100px; height: 100px"
                    :src="scope.row.hotelPic"
                    :preview-src-list="[scope.row.hotelPic]"
                  >
                  </el-image>
                </template>
              </el-table-column>
              <el-table-column prop="realPrice" width="180" label="实际成交价">
              </el-table-column>
              <el-table-column
                prop="finalTotalPrice"
                width="180"
                label="实际成交总价"
              >
              </el-table-column>
              <el-table-column
                prop="flagshipStorePrice"
                width="180"
                label="旗舰店价格"
                show-overflow-tooltip
              >
              </el-table-column>
              <el-table-column
                prop="flagshipStoreFans"
                width="180"
                label="旗舰店粉丝量"
                show-overflow-tooltip
              >
              </el-table-column>
              <el-table-column
                prop="salesNum"
                width="180"
                label="销量"
                show-overflow-tooltip
              >
              </el-table-column>
              <el-table-column
                prop="evaluateContent"
                width="180"
                label="评价"
                show-overflow-tooltip
              >
              </el-table-column>
              <el-table-column
                prop="lowestPrice"
                width="180"
                label="最低价"
                show-overflow-tooltip
              >
              </el-table-column>
              <el-table-column
                prop="link"
                width="180"
                label="链接"
                show-overflow-tooltip
              >
              </el-table-column>
            </el-table>
          </div>
        </div>
        <el-divider
          v-if="
            orderShowMsg.businessRemark &&
            orderShowMsg.businessRemark.length > 0
          "
        ></el-divider>
        <!-- 商务超时说明 -->
        <el-descriptions
          title="商务超时未签单说明"
          v-if="
            orderShowMsg.businessRemark &&
            orderShowMsg.businessRemark.length > 0
          "
        ></el-descriptions>
        <div
          class="good_sku_list"
          v-if="
            orderShowMsg.businessRemark &&
            orderShowMsg.businessRemark.length > 0
          "
        >
          <el-table
            :data="orderShowMsg.businessRemark"
            max-height="300"
            :row-style="{ height: '0' }"
            :cell-style="{ padding: '3px' }"
            border
            style="width: 100%; height: auto"
          >
            <el-table-column prop="businessName" label="商务姓名" width="100">
            </el-table-column>
            <el-table-column prop="content" label="说明内容" width="700">
            </el-table-column>

            <el-table-column prop="createTime" width="175" label="时间">
              <template slot-scope="scope">
                <div>
                  {{
                    scope.row.createTime
                      ? formatterTime(scope.row.createTime)
                      : ""
                  }}
                </div>
              </template>
            </el-table-column>
          </el-table>
        </div>

        <el-divider
          v-if="
            orderShowMsg.businessRemarkReply &&
            orderShowMsg.businessRemarkReply.length > 0
          "
        ></el-divider>
        <!-- 开拓者回复超时反馈 -->
        <el-descriptions
          title="开拓者回复超时反馈"
          v-if="
            orderShowMsg.businessRemarkReply &&
            orderShowMsg.businessRemarkReply.length > 0
          "
        ></el-descriptions>
        <div
          class="good_sku_list"
          v-if="
            orderShowMsg.businessRemarkReply &&
            orderShowMsg.businessRemarkReply.length > 0
          "
        >
          <el-table
            :data="orderShowMsg.businessRemarkReply"
            max-height="300"
            :row-style="{ height: '0' }"
            :cell-style="{ padding: '3px' }"
            border
            style="width: 100%; height: auto"
          >
            <el-table-column prop="pioneerName" label="开拓者姓名" width="100">
            </el-table-column>
            <el-table-column prop="content" label="说明内容" width="700">
            </el-table-column>

            <el-table-column prop="createTime" width="175" label="时间">
              <template slot-scope="scope">
                <div>
                  {{
                    scope.row.createTime
                      ? formatterTime(scope.row.createTime)
                      : ""
                  }}
                </div>
              </template>
            </el-table-column>
          </el-table>
        </div>
      </div>
     

      <div style="margin-top: 20px;display: flex;justify-content: center;" v-if="operationList.includes('project:package')">
        <el-button type="primary" @click="addMsg">上传配包</el-button>
      </div>
  

      <!-- 修改商品信息弹窗 -->
      <el-dialog
        title="商品信息"
        :visible.sync="showUpdateGoodsDialogVisible"
        width="90%"
        :close-on-click-modal="false"
      >
        <div style="display: flex; width: 100%">
          <div style="width: 100%">
            <div
              class="good_sku_list"
              v-if="
                (showGoodList &&
                  showGoodList.length > 0 &&
                  orderShowMsg.fileType == 1) ||
                orderShowMsg.fileType == 4
              "
            >
              <el-table
                :data="showGoodList"
                height="550"
                :row-style="{ height: '0' }"
                :cell-style="{ padding: '3px' }"
                style="width: 100%"
              >
                <el-table-column
                  prop="finalPrice"
                  label="旗舰店实际成交价"
                  fixed
                  width="180"
                >
                  <template slot-scope="scope">
                    <el-input-number
                      v-model="scope.row.finalPrice"
                      :precision="2"
                      :step="0.01"
                      size="small"
                    ></el-input-number>
                  </template>
                </el-table-column>
                <el-table-column prop="" label="数据" fixed width="100">
                  <template slot-scope="scope">
                    <el-popover placement="top" width="400" trigger="click">
                      <el-form
                        label-position="right"
                        label-width="100px"
                        size="small"
                      >
                        <el-form-item label="旗舰店价格">
                          <el-input
                            v-model="scope.row.flagshipStorePrice"
                            placeholder="请输入"
                            size="small"
                          ></el-input>
                        </el-form-item>
                        <el-form-item label="旗舰店粉丝量">
                          <el-input
                            v-model="scope.row.flagshipStoreFans"
                            placeholder="请输入"
                            size="small"
                          ></el-input>
                        </el-form-item>
                        <el-form-item label="销量">
                          <el-input
                            v-model="scope.row.salesNum"
                            placeholder="请输入"
                            size="small"
                          ></el-input>
                        </el-form-item>
                        <el-form-item label="评价">
                          <el-input
                            v-model="scope.row.evaluateContent"
                            placeholder="请输入"
                            size="small"
                          ></el-input>
                        </el-form-item>
                        <el-form-item label="最低价">
                          <el-input
                            v-model="scope.row.lowestPrice"
                            placeholder="请输入"
                            size="small"
                          ></el-input>
                        </el-form-item>
                        <el-form-item label="链接">
                          <el-input
                            v-model="scope.row.link"
                            placeholder="请输入"
                            size="small"
                          ></el-input>
                        </el-form-item>
                      </el-form>
                      <el-button slot="reference" type="text">修改</el-button>
                    </el-popover>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="goodName"
                  label="商品名称"
                  fixed
                  width="180"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="goodExpirationDate"
                  width="180"
                  label="有效期至"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="goodSku"
                  label="规格"
                  width="180"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="goodSkuPrice"
                  width="180"
                  label="旗舰店售卖价"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="goodOnlineLink"
                  width="180"
                  label="天猫/京东链接"
                >
                  <template slot-scope="scope">
                    <el-popover
                      placement="left-start"
                      title=""
                      width="200"
                      trigger="hover"
                      :content="scope.row.goodOnlineLink"
                    >
                      <el-button
                        slot="reference"
                        type="text"
                        v-if="scope.row.goodOnlineLink"
                        >{{ scope.row.goodOnlineLink }}</el-button
                      >
                    </el-popover>
                    <!-- <el-link :href="scope.row.goodOnlineLink" type="primary" target="_blank"
                        v-if="scope.row.goodOnlineLink">跳转</el-link> -->
                  </template>
                </el-table-column>
                <el-table-column
                  prop="goodSkuPic"
                  width="150"
                  label="图片"
                  show-overflow-tooltip
                >
                  <template slot-scope="scope">
                    <el-image
                      v-if="scope.row.goodSkuPic"
                      style="width: 100px; height: 100px"
                      :src="scope.row.goodSkuPic"
                      :preview-src-list="[scope.row.goodSkuPic]"
                    >
                    </el-image>
                  </template>
                </el-table-column>
  
                <el-table-column
                  prop="goodWarrantyDate"
                  width="180"
                  label="保质期"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="goodSkuNum"
                  width="150"
                  label="数量"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="goodCategory"
                  width="180"
                  label="商品所属类别（例:妆字号、械字号、消字号、药字号等）"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="goodBoxNum"
                  width="180"
                  label="箱规（数量）"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="goodBoxSize"
                  width="180"
                  label="箱规（尺寸mm）"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="goodOneSize"
                  width="180"
                  label="单个产品包装尺寸mm"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="shopFans"
                  width="180"
                  label="店铺粉丝量"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="goodSaleNum"
                  width="180"
                  label="产品销量"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column prop="finalPrice" width="180" label="实际成交价">
                </el-table-column>
                <el-table-column
                  prop="finalTotalPrice"
                  width="180"
                  label="实际成交总价"
                >
                </el-table-column>
              </el-table>
            </div>
            <div
              class="good_sku_list"
              v-if="
                showGoodList &&
                showGoodList.length > 0 &&
                orderShowMsg.fileType == 2
              "
            >
              <el-table
                :data="showGoodList"
                max-height="750"
                :row-style="{ height: '0' }"
                :cell-style="{ padding: '3px' }"
                style="width: 100%"
              >
                <el-table-column prop="chainStoreName" fixed label="连锁店铺名称">
                </el-table-column>
                <el-table-column
                  prop="finalPrice"
                  label="旗舰店实际成交价"
                  fixed
                  width="180"
                >
                  <template slot-scope="scope">
                    <el-input-number
                      v-model="scope.row.finalPrice"
                      :precision="2"
                      :step="0.01"
                      size="small"
                    ></el-input-number>
                  </template>
                </el-table-column>
                <el-table-column prop="" label="数据" fixed width="100">
                  <template slot-scope="scope">
                    <el-popover placement="top" width="400" trigger="click">
                      <el-form
                        label-position="right"
                        label-width="100px"
                        size="small"
                      >
                        <el-form-item label="旗舰店价格">
                          <el-input
                            v-model="scope.row.flagshipStorePrice"
                            placeholder="请输入"
                            size="small"
                          ></el-input>
                        </el-form-item>
                        <el-form-item label="旗舰店粉丝量">
                          <el-input
                            v-model="scope.row.flagshipStoreFans"
                            placeholder="请输入"
                            size="small"
                          ></el-input>
                        </el-form-item>
                        <el-form-item label="销量">
                          <el-input
                            v-model="scope.row.salesNum"
                            placeholder="请输入"
                            size="small"
                          ></el-input>
                        </el-form-item>
                        <el-form-item label="评价">
                          <el-input
                            v-model="scope.row.evaluateContent"
                            placeholder="请输入"
                            size="small"
                          ></el-input>
                        </el-form-item>
                        <el-form-item label="最低价">
                          <el-input
                            v-model="scope.row.lowestPrice"
                            placeholder="请输入"
                            size="small"
                          ></el-input>
                        </el-form-item>
                        <el-form-item label="链接">
                          <el-input
                            v-model="scope.row.link"
                            placeholder="请输入"
                            size="small"
                          ></el-input>
                        </el-form-item>
                      </el-form>
                      <el-button slot="reference" type="text">修改</el-button>
                    </el-popover>
                  </template>
                </el-table-column>
                <el-table-column prop="category" fixed label="类别">
                </el-table-column>
                <el-table-column
                  prop="storeNumber"
                  label="店铺数量"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="links"
                  label="美团/大众点评/小程序店铺链接"
                >
                  <template slot-scope="scope">
                    <el-popover
                      placement="left-start"
                      title=""
                      width="200"
                      trigger="hover"
                      :content="scope.row.links"
                    >
                      <el-button
                        slot="reference"
                        type="text"
                        v-if="scope.row.links"
                        >{{ scope.row.links }}</el-button
                      >
                    </el-popover>
                    <!-- <div v-if="scope.row.links">
                        <el-button type="text" @click="goNewPage(scope.row.links)">跳转</el-button>
                      </div> -->
                  </template>
                </el-table-column>
                <el-table-column
                  prop="averageScore"
                  label="美团/大众点评店铺平均评分"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="validityPeriod"
                  label="有效期"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="useTime"
                  label="使用时间"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="distributedCities"
                  label="可使用分布城市"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="productName"
                  label="产品名称"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="packageDetails"
                  label="套餐详细内容"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column prop="price" label="单价"></el-table-column>
                <el-table-column prop="num" label="数量"></el-table-column>
                <el-table-column
                  prop="totalGoodPrice"
                  label="合计货值"
                  show-overflow-tooltip
                ></el-table-column>
                <el-table-column
                  prop="useRights"
                  label="使用权益"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="couponForm"
                  label="卡券形式（电子/实体）"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="usageRestrictions"
                  label="使用限制"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="sellRequirements"
                  label="客户对我司售卖要求"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="storeLinks"
                  label="产品/套餐链接（美团、大众点评等）"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="storePics"
                  label="产品/套餐图片"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="storeSaleNumbers"
                  label="产品/套餐销量（美团、大众点评）"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column
                  prop="verificationProcess"
                  label="核销流程"
                  show-overflow-tooltip
                >
                </el-table-column>
                <el-table-column prop="finalPrice" label="实际成交价">
                </el-table-column>
                <el-table-column
                  prop="finalTotalPrice"
                  width="180"
                  label="实际成交总价"
                >
                </el-table-column>
              </el-table>
            </div>
            <div
              class="good_sku_list"
              v-if="
                showGoodList &&
                showGoodList.length > 0 &&
                orderShowMsg.fileType == 3
              "
            >
              <div class="form_table_goods">
                <el-table
                  :data="showGoodList"
                  max-height="750"
                  :row-style="{ height: '0' }"
                  :cell-style="{ padding: '3px' }"
                  style="width: 100%"
                >
                  <el-table-column prop="hotelName" fixed label="酒店名称">
                  </el-table-column>
                  <el-table-column
                    prop="finalPrice"
                    label="旗舰店实际成交价"
                    fixed
                    width="180"
                  >
                    <template slot-scope="scope">
                      <el-input-number
                        v-model="scope.row.finalPrice"
                        :precision="2"
                        :step="0.01"
                        size="small"
                      ></el-input-number>
                    </template>
                  </el-table-column>
                  <el-table-column prop="" label="数据" fixed width="100">
                    <template slot-scope="scope">
                      <el-popover placement="top" width="400" trigger="click">
                        <el-form
                          label-position="right"
                          label-width="100px"
                          size="small"
                        >
                          <el-form-item label="旗舰店价格">
                            <el-input
                              v-model="scope.row.flagshipStorePrice"
                              placeholder="请输入"
                              size="small"
                            ></el-input>
                          </el-form-item>
                          <el-form-item label="旗舰店粉丝量">
                            <el-input
                              v-model="scope.row.flagshipStoreFans"
                              placeholder="请输入"
                              size="small"
                            ></el-input>
                          </el-form-item>
                          <el-form-item label="销量">
                            <el-input
                              v-model="scope.row.salesNum"
                              placeholder="请输入"
                              size="small"
                            ></el-input>
                          </el-form-item>
                          <el-form-item label="评价">
                            <el-input
                              v-model="scope.row.evaluateContent"
                              placeholder="请输入"
                              size="small"
                            ></el-input>
                          </el-form-item>
                          <el-form-item label="最低价">
                            <el-input
                              v-model="scope.row.lowestPrice"
                              placeholder="请输入"
                              size="small"
                            ></el-input>
                          </el-form-item>
                          <el-form-item label="链接">
                            <el-input
                              v-model="scope.row.link"
                              placeholder="请输入"
                              size="small"
                            ></el-input>
                          </el-form-item>
                        </el-form>
                        <el-button slot="reference" type="text">修改</el-button>
                      </el-popover>
                    </template>
                  </el-table-column>
                  <el-table-column prop="hotelAddress" fixed label="酒店地址">
                  </el-table-column>
                  <el-table-column prop="busyTime" label="旺季时间">
                  </el-table-column>
                  <el-table-column prop="hotelType" label="房型">
                  </el-table-column>
                  <el-table-column prop="expirationDate" label="有效期">
                  </el-table-column>
                  <el-table-column
                    prop="isHaveMorning"
                    label="是否含早"
                  ></el-table-column>
                  <el-table-column prop="num" label="数量"></el-table-column>
                  <el-table-column prop="price" label="平台价"> </el-table-column>
                  <el-table-column prop="url" show-overflow-tooltip label="链接">
                  </el-table-column>
                  <el-table-column prop="hotelPic" label="房间图片">
                    <template slot-scope="scope">
                      <el-image
                        v-if="scope.row.hotelPic"
                        style="width: 100px; height: 100px"
                        :src="scope.row.hotelPic"
                        :preview-src-list="[scope.row.hotelPic]"
                      >
                      </el-image>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="realPrice"
                    width="180"
                    label="实际成交价"
                  >
                  </el-table-column>
                  <el-table-column
                    prop="finalTotalPrice"
                    width="180"
                    label="实际成交总价"
                  >
                  </el-table-column>
                </el-table>
              </div>
            </div>
          </div>
        </div>
        <div slot="footer" class="dialog-footer">
          <el-button @click="showUpdateGoodsDialogVisible = false"
            >取 消</el-button
          >
          <el-button type="primary" @click="showUpdateGoodsDialogVisibleConfirm"
            >确 定</el-button
          >
        </div>
      </el-dialog>
  
      <!-- 推送资源需求 -->
      <el-dialog title="资源需求" :visible.sync="resourcesRemarkDialogVisible">
        <div style="display: flex; width: 100%">
          <div style="align-items: center; display: flex">资源要求：</div>
          <div style="width: 50%">
            <el-input
              type="textarea"
              v-model="resourcesRemark"
              :rows="2"
              placeholder="请输入"
            ></el-input>
          </div>
        </div>
        <div slot="footer" class="dialog-footer">
          <el-button @click="resourcesRemarkDialogVisible = false"
            >取 消</el-button
          >
          <el-button type="primary" @click="submitResourcesRemark"
            >确 定</el-button
          >
        </div>
      </el-dialog>
  
      <!-- 订单评级 -->
      <el-dialog title="订单评级" :visible.sync="setRateDialogVisible">
        <div style="display: flex; width: 100%">
          <div style="align-items: center; display: flex">评级：</div>
          <div style="width: 50%">
            <el-select v-model="chooseRateId" placeholder="请选择评级">
              <el-option
                v-for="item in setRateList"
                :key="item.id"
                :label="item.sysValueName"
                :value="item.id"
              >
              </el-option>
            </el-select>
          </div>
        </div>
        <div slot="footer" class="dialog-footer">
          <el-button @click="setRateDialogVisible = false">取 消</el-button>
          <el-button type="primary" @click="setRateDialogVisibleConfirm"
            >确 定</el-button
          >
        </div>
      </el-dialog>

             <!-- 新增编辑 -->
             <el-dialog :title="formTitle" :visible.sync="addMsgDialogVisible" width="50%" :before-close="addMsgHandleClose">
                <div>
                    <el-form :model="addMsgForm" :rules="addMsgRules" ref="addMsgForm">
                        <el-form-item label="文件类型" prop="fileType" :label-width="formLabelWidth">
                            <el-select disabled v-model="addMsgForm.fileType" filterable>
                                <el-option v-for="(item, index) in fileTypeList" :key="index" :label="item.sysValueName"
                                    :value="item.id">
                                </el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="文件" prop="file" :label-width="formLabelWidth">
                            <el-upload class="upload-demo" ref="upload" drag action="#" :auto-upload="false" :limit="1"
                                :on-change="handleFileChange" :file-list="fileList">
                                <i class="el-icon-upload"></i>
                                <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
                                <!-- <div class="el-upload__tip" slot="tip">只能上传jpg/png文件，且不超过500kb</div> -->
                            </el-upload>
                        </el-form-item>
                        <el-form-item label="备注" prop="remark" :label-width="formLabelWidth">
                            <el-input v-model="addMsgForm.remark" autocomplete="off"></el-input>
                        </el-form-item>
                    </el-form>
                </div>
                <span slot="footer" class="dialog-footer">
                    <el-button @click="addMsgDialogVisible = false">取 消</el-button>
                    <el-button type="primary" @click="addMsgSubmit">确 定</el-button>
                </span>
            </el-dialog>
    </div>
  </template>
  
  <script>
  import APIProject from "@/api/apiProject";
  import APISysLabel from "@/api/apiSysLabel";
  import APIOrder from "@/api/apiOrder";
  import APIUser from "@/api/apiUser";
  import APIProjectFile from "@/api/apiProjectFile";
  import projectmedia from "../create/ProjectMedia";
  import API from "@/api/apidetail";
  export default {
    name: "FeedbackProject",
    props: ["currentStageid","isremark","operationList"],
    components: {
      projectmedia
  },
    data() {
      return {
        parentInfoobj:{},
        brandPlacementTypeList:[],
        medialist:{},
        // 表格相关
        tableLoading: true,
        dataList: [],
        addTimeOutRemarkDialog: false,
        pageSize: 10,
        pageNum: 1,
        total: 0,
        pageSizes: [10, 15, 20],
        projectId: null,
        orderMsgDialogVisible: true,
        orderShowMsg: {
          projectMsg: {},
        },
        showUpdateGoodsDialogVisible: false,
        resourcesRemarkDialogVisible: false,
        setRateDialogVisible: false,
        resourcesRemark: null,
        chooseRateId: null,
        showGoodList: [],
        setRateList: [],
        rateRecordList: [],
  
        // 操作权限相关
        userInfo: {
          role: [],
        },
        addMsgDialogVisible:false,
        addMsgForm:{
            id: null,
                projectId: null,
                fileType: null,
                remark: '',
                file: null,
                fileName: '',
        },
        formTitle: "新增",
        addMsgRules: {
                fileType: { required: true, message: '请选择文件类型', trigger: 'change' },
                // file: { required: true, message: '请上传文件' },
            },
            formLabelWidth: "120px",
            fileTypeList: [],
            fileList: [],
            
  
        // 更多操作选项
        moreOptionsList: [],
      };
    },
    methods: {
      // 全局初始化
      init() {
        // 搜索条件重置
        this.searchForm = {
          keyword: null,
          cateIds: null,
          areaId: null,
          businessId: null,
          startPrice: null,
          endPrice: null,
          statusType: null,
          fileType: null,
          isTimeOut: null,
          orderGo: null,
          pushCheckTimeIndex: null,
          pushSureCheckStartTime: null,
          pushSureCheckEndTime: null,
          showSubOrderType: null,
        };
        this.rePosts();
      },
      // 分页pageSize改变
      handleSizeChange(e) {
        this.pageSize = e;
        this.rePosts();
      },
      // 分页pageNum改变
      handleCurrentChange(e) {
        this.pageNum = e;
        this.getPost();
      },
      // 重新请求
      rePosts() {
        this.pageNum = 1;
        this.dataList = [];
        this.getPost();
      },
      // 表格列表
      getPost() {
        this.tableLoading = true;
        const params = {
          token: this.$store.state.token,
          pageNum: this.pageNum,
          pageSize: this.pageSize,
          projectId: this.projectId,
          stageId: this.currentStageid,
        };
        if (this.searchForm.showSubOrderType) {
          params.showSubOrderType = this.searchForm.showSubOrderType ? 1 : null;
        }
        if (this.searchForm.keyword) {
          params.keyword = this.searchForm.keyword;
        }
        if (this.totalProjectId) {
          params.projectId = this.totalProjectId;
        }
        if (this.searchForm.cateIds) {
          params.cateIds = this.searchForm.cateIds;
        }
        if (this.searchForm.areaId) {
          params.areaId = this.searchForm.areaId;
        }
        if (this.searchForm.businessId) {
          params.businessId = this.searchForm.businessId;
        }
        if (this.searchForm.startPrice) {
          params.startPrice = this.searchForm.startPrice;
        }
        if (this.searchForm.endPrice) {
          params.endPrice = this.searchForm.endPrice;
        }
        if (this.searchForm.statusType) {
          params.statusType = this.searchForm.statusType;
        }
        if (this.statuses) {
          params.statuses = this.statuses;
        }
        if (this.searchForm.fileType) {
          params.fileType = this.searchForm.fileType;
        }
        if (this.searchForm.isTimeOut) {
          params.isTimeOut = this.searchForm.isTimeOut;
        }
        if (this.searchForm.orderGo) {
          params.orderGo = this.searchForm.orderGo;
        }
        if (
          this.searchForm.pushCheckTimeIndex ||
          this.searchForm.pushCheckTimeIndex == 0
        ) {
          let pushCheckTimeMsg =
            this.pushCheckTimeList[this.searchForm.pushCheckTimeIndex];
          if (pushCheckTimeMsg) {
            params.pushSureCheckStartTime = pushCheckTimeMsg.startTime;
            if (pushCheckTimeMsg.endTime) {
              params.pushSureCheckEndTime = pushCheckTimeMsg.endTime;
            }
          }
        }
        if (this.searchForm.pushSureCheckStartTime) {
          params.pushSureCheckStartTime =
            this.searchForm.pushSureCheckStartTime * 60 * 60;
        }
        if (this.searchForm.pushSureCheckEndTime) {
          params.pushSureCheckEndTime =
            this.searchForm.pushSureCheckEndTime * 60 * 60;
        }
        APIOrder.orderList(params).then((res) => {
          if (res.key === 1000) {
            res = res.result;
            this.total = res.count;
            this.dataList = this.handleOrderList(res.list);
            this.tableLoading = false;
          }
        });
      },
      handleOrderList(list) {
        if (list && list.length > 0) {
          list.forEach((item) => {
            item.showProjectMore = false;
            if (item.childOrderList && item.childOrderList.length > 0) {
              item.childOrderList.forEach((child) => {
                child.showProjectMore = false;
              });
            }
          });
        }
        return list;
      },
      showUpdateGoodsDialogVisibleConfirm() {
        let list = this.showGoodList;
        let submitList = [];
        list.forEach((item) => {
          let obj = {
            goodId: item.id,
            skuId: item.goodSkuId ? item.goodSkuId : null,
            num: item.goodSkuNum ? item.goodSkuNum : item.num ? item.num : 0,
            finalPrice: item.finalPrice,
            flagshipStorePrice: item.flagshipStorePrice,
            flagshipStoreFans: item.flagshipStoreFans,
            salesNum: item.salesNum,
            evaluateContent: item.evaluateContent,
            lowestPrice: item.lowestPrice,
            link: item.link,
          };
          submitList.push(obj);
        });
        const params = {
          orderId: this.orderShowMsg.id,
          skuData: JSON.stringify(submitList),
        };
        APIOrder.submitFlagshipStoreData(params).then((res) => {
          if (res.key === 1000) {
            this.$message({
              message: "提交成功",
              type: "success",
            });
            this.getViewMsg({ id: this.orderShowMsg.id });
            this.showUpdateGoodsDialogVisible = false;
          }
        });
      },
      submitResourcesRemark() {
        const params = {
          orderId: this.chooseOrderId,
        };
        if (this.resourcesRemark) {
          params.resourcesRemark = this.resourcesRemark;
        }
        APIOrder.pushOrderResourcesRemark(params).then((res) => {
          if (res.key === 1000) {
            this.$message({
              message: "提交成功",
              type: "success",
            });
            this.resourcesRemarkDialogVisible = false;
            this.resourcesRemark = null;
            this.getPost();
          }
        });
      },
      addMsg() {
            this.addMsgForm = {
               // id: null,
                projectId: null,
                fileType: 5123,
                remark: '',
                file: null,
                fileName: '',
            }
            this.addMsgDialogVisible = true
        },
        handleFileChange(file, fileList) {
            // file: 当前操作的文件对象
            // fileList: 所有已选择的文件列表
            console.log(file, fileList)
            this.fileList = fileList
            this.addMsgForm.file = file.raw
            this.addMsgForm.fileName = file.name
        },
        addMsgSubmit() {
            this.$refs["addMsgForm"].validate((valid) => {
                if (valid) {
                    const params = this.addMsgForm
                    params.projectId = this.projectId
                    //params.token = this.$store.state.token
                    APIProjectFile.doAddProjectFile(params).then((res) => {
                        if (res.status === 200 && (!res.data.key || res.data.key === 1000)) {
                            this.$message({
                                message: '添加成功',
                                type: 'success'
                            });
                            this.fileList = []
                            this.addMsgDialogVisible = false
                            this.$emit('get-stage')
                        }
                    });
                } else {
                    console.log('error submit!!');
                    return false;
                }
            });
        },
        getSysLabelList() {
            const params = {
                token: this.$store.state.token,
                sysLabelIds: "51,2",
            };
            APISysLabel.getSysLabelValueManageList(params).then((res) => {
                if (res.key === 1000) {
                    this.fileTypeList = res.result.data[51];
                    this.brandPlacementTypeList = res.result.data[2];
                }
            });
        },

           //媒体需求列表
    getProjectMediaRequirementsList() {
      let params = {
        pageNum: this.pageNum,
        pageSize: this.pageSize,
        projectId: this.projectId,
        status: 1,
        keyword: this.searchForm.keyword,
        stageId:this.currentStageid
      };
      API.getProjectMediaRequirementsList(params).then((res) => {
        if (res.key == 1000) {
          this.medialist = res.result;
        }
      });
    },

      // 时间格式化
      formatterTime(time) {
        if (!time) return "";
        const date = new Date(time);
        return `${date.getFullYear()}-${this.padZero(date.getMonth() + 1)}-${this.padZero(date.getDate())} ${this.padZero(date.getHours())}:${this.padZero(date.getMinutes())}:${this.padZero(date.getSeconds())}`;
      },
      showUpdateGoodsDialog() {
        this.showUpdateGoodsDialogVisible = true;
        this.showGoodList = this.orderShowMsg.goodList;
      },
  
      // 倒计时格式化
      formatterTime2(time) {
        // 根据实际需求实现倒计时格式化逻辑
        if (!time) return "";
        return time;
      },
  
      // 订单去向格式化
      formatterOrderType(type) {
        // 根据实际业务逻辑实现格式化
        return type || "--";
      },
  
      // 补零工具函数
      padZero(num) {
        return num < 10 ? `0${num}` : num;
      },
  
      // 显示记录列表
      showRecordList(id) {
        const params = {
          token: this.$store.state.token,
          orderId: id,
        };
        APIOrder.getSetOrderRateRecordList(params).then((res) => {
          if (res.key === 1000) {
            this.rateRecordList = res.result.list;
          }
        });
      },
      goViewMsg(row) {
        this.getViewMsg(row);
        this.orderMsgDialogVisible = true;
      },
  
      // 处理操作命令
      handleCommand(e, row) {
        if (e == "a") {
          this.getViewMsg(row);
          this.orderMsgDialogVisible = true;
        } else if (e == "b") {
          this.resourcesRemark = "";
          if (row.resourcesRemark) {
            this.resourcesRemark = row.resourcesRemark;
          }
          this.getPushUserList(row);
        } else if (e == "c") {
          this.getRePushUserList(row);
          this.$confirm("此操作将重新推送该订单, 是否继续?", "提示", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning",
          })
            .then(() => {
              let list = [];
              this.pushUserList.forEach((item) => {
                list.push(item.id);
              });
              const params = {
                orderId: row.id,
                pushUserIds: list.join(","),
              };
              APIOrder.rePushOrderMsg(params).then((res) => {
                if (res.key === 1000) {
                  this.rePushUserDialogVisible = false;
                  this.getPost();
                  this.$message({
                    type: "success",
                    message: "重新推送成功!",
                  });
                }
              });
            })
            .catch((e) => {
              console.log(e);
              this.$message({
                type: "info",
                message: "已取消重新推送",
              });
            });
        } else if (e == "d") {
          this.$confirm("此操作将确认签单该订单, 是否继续?", "提示", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning",
          })
            .then(() => {
              this.handleClickSure(row);
              this.$message({
                type: "success",
                message: "确认签单成功!",
              });
            })
            .catch((e) => {
              console.log(e);
              this.$message({
                type: "info",
                message: "已取消确认签单",
              });
            });
        } else if (e == "e") {
          if (row.isHasChild === 2) {
            this.$message({
              type: "warning",
              message: "不可作废，请先作废子订单",
            });
            return;
          }
          this.$confirm("此操作将永久作废该订单, 是否继续?", "提示", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning",
          })
            .then(() => {
              this.handleClickCancel(row);
              this.$message({
                type: "success",
                message: "作废成功!",
              });
            })
            .catch((e) => {
              console.log(e);
              this.$message({
                type: "info",
                message: "已取消作废",
              });
            });
        } else if (e == "f") {
          if (row.isHasChild === 2) {
            this.$message({
              type: "warning",
              message: "不可删除，请先删除子订单",
            });
            return;
          }
          this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning",
          })
            .then(() => {
              this.handleClickDel(row);
              this.$message({
                type: "success",
                message: "删除成功!",
              });
            })
            .catch((e) => {
              console.log(e);
              this.$message({
                type: "info",
                message: "已取消删除",
              });
            });
        } else if (e == "delChild") {
          this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning",
          })
            .then(() => {
              this.deleteChildOrder(row);
            })
            .catch((e) => {
              this.$message({
                type: "info",
                message: "已取消删除",
              });
            });
        } else if (e == "adjust") {
          if (row.isBlindBox && row.isBlindBox == 2) {
            this.adjustOrderType = 1;
            this.getNormalUserList();
          } else {
            this.adjustOrderType = 2;
          }
          this.chooseOrderId = row.id;
          this.viewAdjust(row);
        } else if (e == "editCost") {
          // this.chooseOrderId = row.id
          // this.editCostDialogVisible = true
          // this.estimatedCost = row.estimatedCost
          // this.actualCost = row.actualCost
          localStorage.setItem("editCostOrder", JSON.stringify(row));
          this.$router.push({
            path: "/EditCostOrder",
          });
        } else if (e == "splitOrder") {
          this.chooseOrderId = row.id;
          this.active = 1;
          this.getViewMsg(row);
          this.splitOrderDialog = true;
        } else if (e == "changeResourcesRemark") {
          this.chooseOrderId = row.id;
          this.resourcesRemarkDialogVisible = true;
          this.resourcesRemark = row.resourcesRemark;
        } else if (e == "addTimeOutRemark") {
          this.chooseOrderId = row.id;
          this.addTimeOutRemarkDialog = true;
        } else if (e == "splitOrderNew") {
          this.chooseOrderId = row.id;
          this.active = 1;
          this.splitOrderNewDialog = true;
        } else if (e == "editCostSubOrder") {
          this.chooseOrderId = row.id;
          this.editCostSubOrderDialogVisible = true;
        } else if (e == "setRate") {
          // 评级
          this.chooseOrderId = row.id;
          this.chooseRateId = null;
          this.getSysLabelListBySetRate();
          this.setRateDialogVisible = true;
        } else if (e == "skipBidding") {
          // 跳过竞价
          this.chooseOrderId = row.id;
          this.getOtherHasBiddingOrderList();
          this.skipBiddingDialogVisible = true;
        }
      },
      getViewMsg(row) {
        const params = {
          projectId: this.projectId,
          stageId:this.currentStageid
        };
        APIOrder.getOrderMsg(params).then((res) => {
          if (res.key === 1000) {
            let data = res.result.data;
            if (data.projectMsg.createTime) {
              data.projectMsg.createDate = this.formatterTime(
                data.projectMsg.createTime
              );
            }
            if (data.biddingOneEndTime) {
              data.biddingOneEndDate = this.formatterTime(data.biddingOneEndTime);
            }
            if (data.createTime) {
              data.createDate = this.formatterTime(data.createTime);
            }
            if (data.checkCostPrice) {
              // 建议成本
              // 成本比例：开拓者建议的成本/客户货值
              data.checkCostPriceRate = (
                (data.checkCostPrice / data.totalPrice) *
                100
              ).toFixed(2);
            }
            if (data.checkCashPrice) {
              // 变现价格
              // 变现折扣：开拓者确认的价格/客户货值
              data.checkCashPriceRate = (
                (data.checkCashPrice / data.totalPrice) *
                100
              ).toFixed(2);
            }
            if (data.checkTime) {
              data.checkTime = this.formatterTime(data.checkTime);
            }
            // 计算实际成交总价
            data.goodList.forEach((item) => {
              let num = item.num;
              if (item.goodSkuNum) {
                num = item.goodSkuNum;
              }
              let finalPrice = item.finalPrice;
              if (item.realPrice) {
                finalPrice = item.realPrice;
              }
              let itemFinalTotalPrice = parseFloat((finalPrice * num).toFixed(2));
              item.finalTotalPrice = itemFinalTotalPrice;
            });
  
            this.orderShowMsg = data;
            this.orderShowMsg.childOrderList = this.handleOrderList(
              this.orderShowMsg.childOrderList
            );
          }
        });
      },
      handleUpdateList(data) {
      if (data) {
        this.pageNum = data.pageNum;
        this.pageSize = data.pageSize;
        this.keyword = data.keyword;
      }
      this.getProjectMediaRequirementsList();
    },
      getSysLabelListBySetRate() {
        const params = {
          token: this.$store.state.token,
          sysLabelIds: "44",
        };
        APISysLabel.getSysLabelValueManageList(params).then((res) => {
          if (res.key === 1000) {
            res = res.result;
            if (res.data) {
              this.setRateList = res.data[44];
            }
          }
        });
      },
      setRateDialogVisibleConfirm() {
        const params = {
          token: this.$store.state.token,
          orderId: this.chooseOrderId,
          rateId: this.chooseRateId,
        };
        APIOrder.doSetOrderRate(params).then((res) => {
          if (res.key === 1000) {
            this.setRateDialogVisible = false;
            this.getPost();
          }
        });
      },
  
      tableRowClassName({ row }) {
        if (row.status == 9) {
          return "warning-row";
        }
      },
      addMsgHandleClose() {
            this.addMsgDialogVisible = false
        },
  
      // 显示操作选项
      showOptions(val) {
        if (val) {
          this.getMoreOptionsList();
        }
      },
      // 获取更多操作
      getMoreOptionsList() {
        const params = {
          token: this.$store.state.token,
          sysLabelIds: 42,
        };
        APISysLabel.getSysLabelValueManageList(params).then((res) => {
          if (res.key === 1000) {
            this.moreOptionsList = res.result.data[42];
          }
        });
      },

          //基本信息
    getProjectManageMsg() {
      let params = {
        projectId: this.projectId,
        stageId:this.stageId
      };
      API.getProjectManageMsg(params).then((res) => {
        if (res.key == 1000) {
          this.parentInfoobj = res.result.data;
        }
      });
    },
  
      // 更多操作选项变化
      moreOptionsChange(val, row) {
        if (val === 155) {
          this.handleCommand("b", row);
        } else {
          this.moreTitle = this.moreOptionsList.find(
            (item) => item.id === val
          ).sysValueName;
          this.moreOptionsDialog = true;
          this.moreOptionsForm = {
            orderId: row.id,
            totalPrice: row.totalPrice,
            useType: val,
          };
        }
      },
    },
    created() {
      let projectId = this.$ls.get("projectId");
      if (projectId) {
        this.projectId = projectId;
        this.init();
      }
      this.getSysLabelList();
      this.getViewMsg();
      this.getProjectMediaRequirementsList();
      this.getProjectManageMsg();

      //this.getMoreOptionsList();
    },
  };
  </script>
  
  <style lang="sass">
  .verification-project-container
    padding: 20px
    background-color: #f5f7fa
  
  ::v-deep .el-table
    margin-bottom: 20px
    border-radius: 4px
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05)
  
  .global-page
    margin-top: 15px
    text-align: right
  
  ::v-deep .el-table .cell
    white-space: normal
    word-break: break-all
    line-height: 1.5
  
  ::v-deep .el-table__row
    height: auto !important
  </style>
  
  <style>
  .el-table .warning-row {
    background: #f5f5f5;
  }


  </style>
  